import request from '@/utils/request'
//获取父级帖子类型
export function getParentCommentType() {
  return request({
    method: 'GET',
    url: '/commentservice/comment-type/getParentCommentType',
    headers: {
      'Content-Type': 'application/json'
    }
  }).then(res => res.data)
}
//获取全部帖子类型
export function getCommentType(parentId) {
  return request({
    method: 'GET',
    url: `/commentservice/comment-type/getCommentTypeByParentId/${parentId}`,
  }).then(res => res.data)
}
//获取全部帖子类型
export function getAllCommentType() {
  return request({
    method: 'GET',
    url: '/commentservice/comment-type/getAllCommentType',
    headers: {
      'Content-Type': 'application/json'
    }
  }).then(res => res.data)
}

export function getAllStudyType() {
  return request({
    method: 'POST',
    url: '/studyservice/study-type/getAllStudyType/{page}/{limit}',
    headers: {
      'Content-Type': 'application/json'
    },

  }).then(res => res.data)
}


export function getStudyBook(page, limit, queryVo) {

  return request({
    method: 'POST',
    url: `/studyservice/study-data/getStudyDataByQueryVo/${page}/${limit}`,
    headers: {
      'Content-Type': 'application/json'
    },
    data: queryVo
  }).then(res => res.data)
}

export function updateViewCount(id) {

  return request({
    method: 'PUT',
    url: `/studyservice/study-data/updateViewCount/${id}`,
    headers: {
      'Content-Type': 'application/json'
    },
  }).then(res => res.data)
}
// 学术交流热搜栏热度
export function getPostByScore() {

  return request({
    method: 'GET',
    url: `/commentservice/comment-post/getPostByScore`,
    headers: {
      'Content-Type': 'application/json'
    },
  }).then(res => res.data)
}
// 热搜栏时间

export function getCurrentTime() {

  return request({
    method: 'GET',
    url: `/joinservice/join-activity/getCurrentTime`,
    headers: {
      'Content-Type': 'application/json'
    },
  }).then(res => res.data)
}

// 学习资料热搜栏热度
export function getStudyDataByScore() {

  return request({
    method: 'GET',
    url: `/studyservice/study-data/getStudyDataByScore`,
    headers: {
      'Content-Type': 'application/json'
    },
  }).then(res => res.data)
}
